package com.lipaluma.field.merge;

/**
 * Interface used to allows merge, unmerge on field by passing the objects target
 * @author Mario
 */
public interface MergeAlgorithmByTarget extends FieldMergedAlgorithm {
	/**
	 * used to initiate the merge algorithm when the first object mapped for an id is encountered.
	 * @param target the first object mapped for an id
	 */
	void initMergeWithFirstElement(Object target);
	
	/**
	 * used to merge the first object mapped with the second element encoutered. The master object is the first
	 * @param target the master object mapped
	 * @param addon the second object mapped with the same id
	 */	
	void merge(Object target, Object addon);	
}
